﻿using System.Collections.Generic;
using HDM.NexusEngine.Core;

namespace HDM.NexusEngine.EngineTest
{
    public class TileMap
    {
        struct MapPosition
        {
            public int X { get; set; }
            public int Y { get; set; }
        }

        private readonly Dictionary<MapPosition, Tile> _map = new Dictionary<MapPosition, Tile>();

        public TileMap()
        {

        }

        internal void AddTile(int xPosition, int yPosition, Tile t)
        {
            _map.Add(new MapPosition { X = xPosition, Y = yPosition }, t);
        }

        internal void Render(Renderer renderer)
        {
            foreach (var t in _map.Values)
            {
                t.Render(renderer);
            }
        }
    }
}